import 'dart:convert';

class ChatModel {
  final String userName;
  final String msg;

  ChatModel({required this.userName, required this.msg});

  factory ChatModel.fromJson(Map<String, dynamic> json) {
    return ChatModel(userName: json['userName'], msg: json['msg']);
  }

  String toJsonString() {
    return jsonEncode({'userName': userName, 'msg': msg});
  }
}
